/*
 * BlinkLed.c
 *
 * Created: 08.10.2012 21:50:36
 *  Author: Horea Pop
 */ 

// This is placed here for a reason. Otherwise it will just jump to the default 1Mhz clock
# define F_CPU 16000000UL

#include <avr/io.h>
#include <util/delay.h>



enum {
	BLINK_DELAY_MS = 1000,
};

int main (void)
{

	/* set pin 5 of PORTB for output*/
	DDRB |= _BV(DDB5);
	
	while(1) 
	{

		/* set pin 5 high to turn led on */
		PORTB |= _BV(PORTB5);
		_delay_ms(BLINK_DELAY_MS);

		/* set pin 5 low to turn led off */
		PORTB &= ~_BV(PORTB5);
		_delay_ms(BLINK_DELAY_MS);
	}

 return 0;
}


